package com.ischoolbar.programmer.service.admin.impl;

import com.ischoolbar.programmer.dao.admin.MenuDao;
import com.ischoolbar.programmer.entity.admin.Menu;
import com.ischoolbar.programmer.service.admin.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MenuServcieImpl implements IMenuService {

    @Autowired
    MenuDao menuDao;

    @Override
    public void addMenu(Menu menu) {
        menuDao.addMenu(menu);
    }

    @Override
    public List<Menu> findList(Map<String, Object> queryMap) {
        return menuDao.findList(queryMap);
    }

    @Override
    public List<Menu> findTopList() {
        return menuDao.findTopList();
    }

    @Override
    public Integer totalCount() {
        return menuDao.totalCount();
    }

    @Override
    public void edit_menu(Menu menu) {
        menuDao.edit_menu(menu);
    }

    @Override
    public void delete_menu(Integer id) {
        menuDao.delete_menu(id);
    }

    @Override
    public List<Menu> findChildrenList(Integer parentId) {
        return menuDao.findChildrenList(parentId);
    }

    @Override
    public List<Menu> findMenuListBymenusId(String ids) {
        return menuDao.findMenuListBymenusId(ids);
    }
}
